import request from '@/utils/http'
import { BaseResult } from '@/types/axios'
import { UserLogin } from '@/types/store'

export class LoginService {
  // 登录
  static login(data: UserLogin) {
    return request.post<BaseResult>({
      url: '/login',
      data
    })
  }
  // 退出
  static logout(token: string) {
    return request.post<BaseResult>({
      url: '/login_out',
      data: { token }
    })
  }
}
